extends ../common/layout
block content
  div(class='container')
    div(class='row-fluid show-grid')
      div(class='span12')
         h4 #{notebook.name}
           small &nbsp;&nbsp;(#{user.nick})
         if(!isSelf)
           ul(class='User-muen')
             li
              a(class='gh-btn',href='/user/profile/#{user._id}') #{user.nick} 的主页
         hr 
         if(userDiaryList.length)
           div(class='Diary-wrap')
             each item,i in userDiaryList 
               h5
                 a(href="/diary/#{item._id}") #{item.created_user}的日记 
                 small [#{notebook.name}]
                 if(item.title)
                   a(href='/diary/#{item._id}') 
                     small [#{item.title}] 
                   if(item.privacy == 1)
                     small [仅自己可见] 
                 else
                   if(item.privacy == 1)
                     small [仅自己可见]
                   if(item.weather)
                     small [天气:#{item.weather}] 
                   if(item.mood)
                     small [心情:#{item.mood}] 
                   if(item.location)
                     small [地点:#{item.location}]
               div(class='Diary-content')
                  if(item.img)
                      img(src='#{item.img}')
                  p #{item.content}
               div(class='bar') #{item.created_at} 
                 small #{item.commentcount}回复 
                 if(isSelf)
                   form(action='/diary/remove',method='post') 
                     input(type='hidden',value='#{item._id}',name='id')
                     div(class="btn-group")
                       a(class='btn btn-mini',href='/diary/edit/#{item._id}') Edit 
                       button(class='btn btn-mini btn-danger',type='submit') Del
           !{pag}
         else
           p 额，他还什么都木有写……
    include ../common/footer
